﻿window.SearchKey = null;
$.MGJ.Querycatch = [];
(function () {
    var _this = $.MGJ.Querycatch;
    $.extend($.MGJ.Querycatch, {
        ExeclExport: function (ele) {
            var Fw_SCode = $("#Fw_SCode").val();
            if (!$(ele).find('.no-result').hasClass('no-result')) {
                window.open(ACTION_URL("ExeclExport", "AntiFake") + "?Fw_SCode=" + window.SearchKey);
            }
            else {
                $.L.msgWarning('导出数据不能为空！')
            }
        }
    });
})(jQuery);
(function () {
    var _this = $.MGJ.Querycatch;
    $.extend($.MGJ.Querycatch, {
        Ajax_querycatchList: function (pageIndex) {
            window.SearchKey = removeSpace($("#Fw_SCode").val());
            _index = pageIndex;
            $.L.ajaxHandle({
                url: ACTION_URL("QuerycatchList", "AntiFake") + "?pageindex=" + pageIndex,
                data: $("#SearchForm").serialize(),
                success: function (response) {
                    $("#querycatchTable").L_bindingDataList(response);
                    $(".Valid").each(function () {
                        if ($(this).html() == 0) {
                            $(this).html("异常")
                        }
                        else if ($(this).html() == 1) {
                            $(this).html("是")
                        }
                    })
                    $(".QueryType").each(function () {
                        if ($(this).text() == "0") {
                            $(this).html("微信")
                        }
                        else if ($(this).text() == "1") {
                            $(this).html("网站")
                        }
                        else if ($(this).text() == "2") {
                            $(this).html("短信")
                        }
                        else if ($(this).text() == "3") {
                            $(this).html("电话")
                        }
                        
                        else if ($(this).text() == "4") {
                            $(this).html("Wap")
                        }
                    })
                }
            });

           

        }
    
   
    });
})(jQuery);